﻿@page "/ProgrammaticNavigationCases"
@inject NavigationManager NavigationManager

<div id="test-info">This page has test cases for programmatic navigation.</div>

<button id="do-other-navigation" @onclick="@(() => NavigationManager.NavigateTo("Other", new NavigationOptions()))">
    Programmatic navigation (NavigationOptions overload)
</button>

<button id="do-other-navigation2" @onclick="@(() => NavigationManager.NavigateTo("Other", false))">
    Programmatic navigation (bool overload)
</button>

<button id="do-other-navigation-forced" @onclick="@(() => NavigationManager.NavigateTo("Other", true))">
    Programmatic navigation with force-load
</button>

<button id="do-other-navigation-forced-state" @onclick="@(() => NavigationManager.NavigateTo("Other", new NavigationOptions{ HistoryEntryState = "state", ForceLoad = true }))">
    Programmatic navigation (NavigationOptions overload) with force-load and state
</button>

<button id="do-other-navigation-replacehistoryentry" @onclick="@(() => NavigationManager.NavigateTo("Other", replace: true))">
    Programmatic navigation with replace
</button>

<button id="do-other-navigation-forced-replacehistoryentry" @onclick="@(() => NavigationManager.NavigateTo("Other", forceLoad: true, replace: true))">
    Programmatic navigation with force-load and replace
</button>

<button id="do-other-navigation-state" @onclick="@(() => NavigationManager.NavigateTo("Other", new NavigationOptions { HistoryEntryState = "state" }))">
    Programmatic navigation (NavigationOptions overload) with state
</button>

<button id="do-other-navigation-state-replacehistoryentry" @onclick="@(() => NavigationManager.NavigateTo("Other", new NavigationOptions { HistoryEntryState = "state", ReplaceHistoryEntry = true }))">
    Programmatic navigation (NavigationOptions overload) with replace and state
</button>
